//
//  RW_UserSongModel.m
//  SleepApp
//
//  Created by chuangqi on 2021/4/7.
//  Copyright © 2021 RiceWang. All rights reserved.
//

#import "RW_UserSongModel.h"

@implementation RW_UserSongModel

/** 删除歌单歌曲歌曲信息 */
+ (FBLPromise<NSString *> *)deleteToUserSingleSongId:(NSString *)userSingleSongId{
    return [FBLPromise async:^(FBLPromiseFulfillBlock  _Nonnull fulfill, FBLPromiseRejectBlock  _Nonnull reject) {
        [HTTPRequestTool putWithUrl:deleteUserSingleSongUrl refreshCache:NO params:@{
            @"xid":userSingleSongId
        } success:^(id response) {
            HTTPLogicalModel *model = [HTTPLogicalModel yy_modelWithJSON:response];
            if (!model.success){
                reject([NSError errorWithDomain:model.message code:model.code userInfo:nil]);
                return;
            }
            fulfill(model.data);
        } fail:^(NSError *error) {
            reject(error);
        }];
    }];
}
@end
